home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / dbms_mag / 9108 / techtip1.aug < prev    next >
Text File  |  1991-06-17  |  2KB  |  73 lines

  1. LISTING 1
  2.  
  3. * Author:      Bo Guo & Carl Kurt, 
  4. *              Transportation Ctr., Univ. of Kanasa, Lawrence, KS 66045
  5. * Note:        Block code and program code for changing cursor type
  6. * Language:    dBXL/QuickSilver 1.3
  7.  
  8. ****    The following block should be place in the main calling program ****
  9. *       Before changing cursor type, read original type by
  10. *       calling DOS function 03hex at DOS interrupt 10hex
  11.  
  12. PUBL IntNum,AxReg,BxReg,CxReg,DxReg,CH,CL
  13. AxReg = HTOI("0300")
  14. IntNum = HTOI("10")
  15. STORE 0 to BxReg,CxReg,DxReg
  16. DOSINT IntNum,AxReg,BxReg,CxReg,DxReg
  17. CH = int(cxreg/256)             && Starting scan line of the original cursor
  18. CL = mod(cxreg,256)             && Ending scan line of the original cursor
  19.  
  20. ****    End of the Block    ****
  21.  
  22.  
  23. **** Program for changing cursor type           ****
  24. *       CURSTYP.PRG, Call DOS function 01hex at DOS interrupt 10hex
  25.  
  26. PARA Switch
  27. PRIV IntNum,AxReg,BxReg,CxReg,DxReg
  28. IntNum = 16
  29. AxReg = 256
  30. Store 0 to BxReg, CxReg, DxReg
  31. DO CASE
  32.         CASE Switch = 0         && Turn off Cursor (Set CH = 20h)
  33.                 CxReg = 32*256 + CL
  34.         CASE Switch = 1         && Restore original Cursor type
  35.                 CxReg = CH*256 + CL
  36.         CASE Switch = 2         && Full Cursor (Set CH = 0h)
  37.                 CxReg = CL
  38. ENDC
  39. DOSINT IntNum,AxReg,BxReg,CxReg,DxReg
  40. RETU
  41.  
  42. ****      End of the Program      ****
  43.  
  44. * PROG: CURSMAIN.PRG
  45. * calls CURSTYP.PRG for test
  46.  
  47. SET TALK OFF
  48. CLEA
  49.  
  50. PUBL IntNum,AxReg,BxReg,CxReg,DxReg,CH,CL
  51. AxReg = HTOI("0300")
  52. IntNum = HTOI("10")
  53. STORE 0 to BxReg,CxReg,DxReg
  54. DOSINT IntNum,AxReg,BxReg,CxReg,DxReg
  55. CH = int(cxreg/256)     && Starting scan line of the original cursor
  56. CL = mod(cxreg,256)     && Ending scan line of the original cursor
  57.  
  58. DO CURSTYP WITH 0
  59. ? "I am Gone.."
  60. WAIT " "
  61. ?
  62.  
  63. DO CURSTYP WITH 2
  64. ? "I am Big.."
  65. WAIT " "
  66. ?
  67.  
  68. DO CURSTYP WITH 1
  69. ? "I am Back.."
  70. WAIT " "
  71.  
  72. RETU
  73.